<template>
    <div>
      <h2>测试axios的get请求;获取对应仓库的所有issues</h2>
      <ul>
        <li v-for="issue in issues" :key="issue.id">
          <span>{{issue.title}}</span>
        </li>
      </ul>
    </div>
</template>

<script>
    import axios from 'axios'
    export default {
        name: "testGet",
        data(){
          return {
            issues:[]
          }
        },
        async mounted(){
          const body = await axios({
              method: 'get',
              url: 'https://api.github.com/repos/betterDamu/sh_200318/issues'
          });

          console.log(body.data);
          this.issues = body.data;
        }
    }
</script>

<style scoped>

</style>
